import { createRouter, createWebHashHistory } from 'vue-router'
import index from '../views'
import home from '../views/pages/home.vue'
import login from '../views/pages/login.vue'
import newsList from '@/views/pages/news/list'
import yonghuList from '@/views/pages/yonghu/list'
import yonghuDetail from '@/views/pages/yonghu/formModel'
import yonghuAdd from '@/views/pages/yonghu/formAdd'
import yonghuRegister from '@/views/pages/yonghu/register'
import yonghuCenter from '@/views/pages/yonghu/center'
import jingdianfenleiList from '@/views/pages/jingdianfenlei/list'
import jingdianfenleiDetail from '@/views/pages/jingdianfenlei/formModel'
import jingdianfenleiAdd from '@/views/pages/jingdianfenlei/formAdd'
import jingdianxinxiList from '@/views/pages/jingdianxinxi/list'
import jingdianxinxiDetail from '@/views/pages/jingdianxinxi/formModel'
import jingdianxinxiAdd from '@/views/pages/jingdianxinxi/formAdd'
import storeupList from '@/views/pages/storeup/list'
import systemintroList from '@/views/pages/systemintro/list'
import systemintroDetail from '@/views/pages/systemintro/formModel'
import systemintroAdd from '@/views/pages/systemintro/formAdd'

const routes = [{
		path: '/',
		redirect: '/index/home'
	},
	{
		path: '/index',
		component: index,
		children: [{
			path: 'home',
			component: home
		}
		, {
			path: 'newsList',
			component: newsList
		}
		, {
			path: 'yonghuList',
			component: yonghuList
		}, {
			path: 'yonghuDetail',
			component: yonghuDetail
		}, {
			path: 'yonghuAdd',
			component: yonghuAdd
		}
		, {
			path: 'yonghuCenter',
			component: yonghuCenter
		}
		, {
			path: 'jingdianfenleiList',
			component: jingdianfenleiList
		}, {
			path: 'jingdianfenleiDetail',
			component: jingdianfenleiDetail
		}, {
			path: 'jingdianfenleiAdd',
			component: jingdianfenleiAdd
		}
		, {
			path: 'jingdianxinxiList',
			component: jingdianxinxiList
		}, {
			path: 'jingdianxinxiDetail',
			component: jingdianxinxiDetail
		}, {
			path: 'jingdianxinxiAdd',
			component: jingdianxinxiAdd
		}
		, {
			path: 'storeupList',
			component: storeupList
		}
		, {
			path: 'systemintroList',
			component: systemintroList
		}, {
			path: 'systemintroDetail',
			component: systemintroDetail
		}, {
			path: 'systemintroAdd',
			component: systemintroAdd
		}
		]
	},
	{
		path: '/login',
		component: login
	}
	,{
		path: '/yonghuRegister',
		component: yonghuRegister
	}
]

const router = createRouter({
  history: createWebHashHistory(process.env.BASE_URL),
  routes
})

export default router
